select * from PhieuNhapKhos
-------------
create trigger ID_NhapKho
on PhieuNhapKhos
for insert
as
    begin
        DECLARE @tam int
   		set @tam=(select count(*) from PhieuNhapKhos)
        UPDATE PhieuNhapKhos set Id = 'PN000'+cast(@tam as nchar(3)) where Id = ''
    end
